#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <assert.h>

size_t My_strlen(char* pa)
{
	size_t count = 0;
	while (*pa != '\0')
	{
		pa++;
		count++;
	}
	return count;
}

char* My_strcpy(char* dest, const char* sour)
{
	assert(dest && sour);
	char* ret = dest;
	while (*dest++ = *sour++);
	return ret;
}

char* My_strcat(char* dest, char* sour)
{
	assert(dest && sour);
	char* ret = dest;
	while (*dest)
		dest++;
	while (*dest++ = *sour++);
	return ret;
}

int main()
{
	char str1[20] = "hello ";
	char str2[20];
	char str3[20] = "bit";
	printf("%zd\n", My_strlen(str1));
	My_strcpy(str2, str1);
	puts(str2);
	My_strcat(str1, str3);
	puts(str1);
	return 0;
}